<template>
  <div>
    <h1>我是哥哥，我的年龄是{{ car }}</h1>
    <button @click="changeCar">过了生日就长大了</button>
  </div>
</template>

<script>
export default {
  name: "Gege",
  data() {
    return {
      car: "二十",
    };
  },
  methods: {
    changeCar() {
      this.car = "二十二";
      this.$bus.$emit("getCar", this.car);
    },
  },
};
</script>

<style></style>
